package com.four.collage.controller;


import com.four.collage.entity.Groupmember;
import com.four.collage.service.IGroupmanageService;
import com.four.collage.service.IGroupmemberService;
import com.guli.common.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author gs
 * @since 2021-12-18
 */
@RestController
@RequestMapping("/groupmember")
public class GroupmemberController {


    @Autowired
    private IGroupmemberService groupmemberService;


    /**
     * 根据拼团管理id查询拼团人员记录表
     * @param groId
     * @return
     */
    @GetMapping("/getGroupmemberByGroId/{groId}")
    public R list(@PathVariable("groId")Integer groId){
        List<Groupmember> groupmemberList=groupmemberService.getGroupmemberByGroId(groId);
        return R.ok().put("groupmemberList",groupmemberList);
    }
}
